<!Doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
		<meta name="description" content="ESP8266 Deauther">
		<meta name="author" content="Spacehuhn - Stefan Kremser">
		<meta name="theme-color" content="#36393E" />
		<title>ESP8266 Deauther</title>
		<link rel="stylesheet" href="style.css">
		<script src="js/site.js"></script>
		<script src="js/scan.js"></script>
	</head>
	<body onload="loadLang()">
		<nav>
			<a href="scan.html" data-translate="scan">Scan</a>
			<a href="ssids.html" data-translate="ssids">SSIDs</a>
			<a href="attack.html" data-translate="attacks">Attacks</a>
			<a href="settings.html" data-translate="settings">Settings</a>
			<a class="right" href="info.html" data-translate="info">Info</a>
		</nav>
		<div class="container">
			<div class="row">
				<div class="col-12">
					<div id="error" class="hide"></div>
					<h1 class="header" data-translate="scan">Scan</h1>
					
					<button onclick="scan(0)">Scan APs</button>
					<button onclick="scan(1)">Scan Stations</button>
					<button onclick="load()" data-translate="reload" class="right">Reload</button>
				</div>
			</div>
			<div class="row">
				<div class="col-6">
					<label for="ch" data-translate="channel">Channel</label>
				</div>
				<div class="col-6">
					<select id="ch" name="ch">
						<option value="all" data-translate="all">All</option>
						<option value="1">1</option>
						<option value="2">2</option>
						<option value="3">3</option>
						<option value="4">4</option>
						<option value="5">5</option>
						<option value="6">6</option>
						<option value="7">7</option>
						<option value="8">8</option>
						<option value="9">9</option>
						<option value="10">10</option>
						<option value="11">11</option>
						<option value="12">12</option>
						<option value="13">13</option>
						<option value="14">14</option>
					</select>
				</div>
			</div>
			<div class="row">
				<div class="col-6">
					<label data-translate="station_scan_time">Station Scan Time</label>
				</div>
				<div class="col-6">
					<input type="number" value="15" id="scanTime">s
				</div>
			</div>
			<div class="row">
				<div class="col-12">
					<p>
						<span class="red" data-translate="info_span">INFO: </span><br>
						<span data-translate="scan_info">
						- Click Scan and wait until the blue LED on your board turns off (or changes to green), then click on Reload.<br>
						- The web interface will be unavailable during a station scan and you will have to reconnect!<br>
						- Please select only one target!<br>
						</span>
						<span data-translate="info_disclaimer">In case of an unexpected error, please reload the site and look at the serial monitor for further debugging.</span>
					</p>
					
					<hr>
					
					<h2><span>Access Points</span>: <span id="apNum"></span></h2>
					<table id="apTable"></table>
					<button onclick="selectAll(0,true)" data-translate="select_all">select all</button>
					<button onclick="selectAll(0,false)" data-translate="deselect_all">deselect all</button>
					
					<hr>
					
					<h2><span>Stations</span>: <span id="stNum"></span></h2>
					<table id="stTable"></table>
					<button onclick="selectAll(1,true)" data-translate="select_all">select all</button>
					<button onclick="selectAll(1,false)" data-translate="deselect_all">deselect all</button>
					
					<hr>
					
					<h2><span data-translate="devices">Saved Devices</span>: <span id="nNum"></span></h2>
					<table id="nTable"></table>
					<button onclick="selectAll(2,true)" data-translate="select_all">select all</button>
					<button onclick="selectAll(2,false)" data-translate="deselect_all">deselect all</button>
					<button onclick="add(2)" data-translate="new">new</button>
					
					<div id="copyright">
						<a href="https://github.com/spacehuhn/esp8266_deauther/wiki" target="_blank">Wiki</a> | <a href="https://github.com/spacehuhn/esp8266_deauther" target="_blank">GitHub</a><br>
						<br>
						Version 2.0<br>
						Copyright (c) 2018 Stefan Kremser<br>
						<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
